﻿using System.Collections.Generic;

namespace Sims3Package.Interface
{
    interface IPackage
    {
        /// <summary>
        /// Major number, 2 in Sims 3 package.
        /// </summary>
        int Major { get; set; }
        /// <summary>
        /// Minor number, 0 in Sims 3 package
        /// </summary>
        int Minor { get; set; }

        /// <summary>
        /// Unknown 1, length 24 byte array
        /// </summary>
        byte[] Unknown1 { get; set; }
        /// <summary>
        /// Number of index entries - if zero, size and position also zero
        /// </summary>
        int EntryCount { get;}
        /// <summary>
        /// Unknown 2, length 4 byte array
        /// </summary>
        uint Unknown2 { get; set; }
        /// <summary>
        /// Unknown 3, length 12 byte array
        /// </summary>
        byte[] Unknown3 { get; set; }
        /// <summary>
        /// Index version, always 3
        /// </summary>
        int IndexVersion { get; set; }
        /// <summary>
        /// Absolute position of index.
        /// </summary>
        int IndexPosition { get; set; }
        /// <summary>
        /// Unknown 4, length 28 byte array
        /// </summary>
        byte[] Unknown4 { get; set; }
        /// <summary>
        /// List of Entries in package
        /// </summary>
        List<ResourceEntry> EntryList { get; set; }
        /// <summary>
        /// Save the package to where it is
        /// </summary>
        void Save();
        /// <summary>
        /// Save package to given path
        /// </summary>
        /// <param name="path"></param>
        void SaveAs(string path);

    }
}
